3.282 \(\int \cot ^2(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx\)

Optimal. Leaf size=82 \[ -\frac {2 a^2 \cot ^3(c+d x)}{3 d}+\frac {5 a^2 \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {3 a^2 \cot (c+d x) \csc (c+d x)}{8 d} \]

[Out]

5/8*a^2*arctanh(cos(d*x+c))/d-2/3*a^2*cot(d*x+c)^3/d-3/8*a^2*cot(d*x+c)*csc(d*x+c)/d-1/4*a^2*cot(d*x+c)*csc(d*
x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.20, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2873, 2611, 3770, 2607, 30, 3768} \[ -\frac {2 a^2 \cot ^3(c+d x)}{3 d}+\frac {5 a^2 \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {3 a^2 \cot (c+d x) \csc (c+d x)}{8 d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^2*Csc[c + d*x]^3*(a + a*Sin[c + d*x])^2,x]

[Out]

(5*a^2*ArcTanh[Cos[c + d*x]])/(8*d) - (2*a^2*Cot[c + d*x]^3)/(3*d) - (3*a^2*Cot[c + d*x]*Csc[c + d*x])/(8*d) -
 (a^2*Cot[c + d*x]*Csc[c + d*x]^3)/(4*d)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 2873

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \cot ^2(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx &=\int \left (a^2 \cot ^2(c+d x) \csc (c+d x)+2 a^2 \cot ^2(c+d x) \csc ^2(c+d x)+a^2 \cot ^2(c+d x) \csc ^3(c+d x)\right ) \, dx\\ &=a^2 \int \cot ^2(c+d x) \csc (c+d x) \, dx+a^2 \int \cot ^2(c+d x) \csc ^3(c+d x) \, dx+\left (2 a^2\right ) \int \cot ^2(c+d x) \csc ^2(c+d x) \, dx\\ &=-\frac {a^2 \cot (c+d x) \csc (c+d x)}{2 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {1}{4} a^2 \int \csc ^3(c+d x) \, dx-\frac {1}{2} a^2 \int \csc (c+d x) \, dx+\frac {\left (2 a^2\right ) \operatorname {Subst}\left (\int x^2 \, dx,x,-\cot (c+d x)\right )}{d}\\ &=\frac {a^2 \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {2 a^2 \cot ^3(c+d x)}{3 d}-\frac {3 a^2 \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {1}{8} a^2 \int \csc (c+d x) \, dx\\ &=\frac {5 a^2 \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {2 a^2 \cot ^3(c+d x)}{3 d}-\frac {3 a^2 \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{4 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.11, size = 209, normalized size = 2.55 \[ a^2 \left (-\frac {\tan \left (\frac {1}{2} (c+d x)\right )}{3 d}+\frac {\cot \left (\frac {1}{2} (c+d x)\right )}{3 d}-\frac {\csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {3 \csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {\sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {3 \sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {5 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}+\frac {5 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {\cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{12 d}+\frac {\tan \left (\frac {1}{2} (c+d x)\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{12 d}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^2*Csc[c + d*x]^3*(a + a*Sin[c + d*x])^2,x]

[Out]

a^2*(Cot[(c + d*x)/2]/(3*d) - (3*Csc[(c + d*x)/2]^2)/(32*d) - (Cot[(c + d*x)/2]*Csc[(c + d*x)/2]^2)/(12*d) - C
sc[(c + d*x)/2]^4/(64*d) + (5*Log[Cos[(c + d*x)/2]])/(8*d) - (5*Log[Sin[(c + d*x)/2]])/(8*d) + (3*Sec[(c + d*x
)/2]^2)/(32*d) + Sec[(c + d*x)/2]^4/(64*d) - Tan[(c + d*x)/2]/(3*d) + (Sec[(c + d*x)/2]^2*Tan[(c + d*x)/2])/(1
2*d))

________________________________________________________________________________________

fricas [B]  time = 0.51, size = 155, normalized size = 1.89 \[ -\frac {32 \, a^{2} \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) - 18 \, a^{2} \cos \left (d x + c\right )^{3} + 30 \, a^{2} \cos \left (d x + c\right ) - 15 \, {\left (a^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 15 \, {\left (a^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{48 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*csc(d*x+c)^5*(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/48*(32*a^2*cos(d*x + c)^3*sin(d*x + c) - 18*a^2*cos(d*x + c)^3 + 30*a^2*cos(d*x + c) - 15*(a^2*cos(d*x + c)
^4 - 2*a^2*cos(d*x + c)^2 + a^2)*log(1/2*cos(d*x + c) + 1/2) + 15*(a^2*cos(d*x + c)^4 - 2*a^2*cos(d*x + c)^2 +
 a^2)*log(-1/2*cos(d*x + c) + 1/2))/(d*cos(d*x + c)^4 - 2*d*cos(d*x + c)^2 + d)

________________________________________________________________________________________

giac [B]  time = 0.24, size = 164, normalized size = 2.00 \[ \frac {3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 16 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 24 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 120 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 48 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {250 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 48 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 16 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}}}{192 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*csc(d*x+c)^5*(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/192*(3*a^2*tan(1/2*d*x + 1/2*c)^4 + 16*a^2*tan(1/2*d*x + 1/2*c)^3 + 24*a^2*tan(1/2*d*x + 1/2*c)^2 - 120*a^2*
log(abs(tan(1/2*d*x + 1/2*c))) - 48*a^2*tan(1/2*d*x + 1/2*c) + (250*a^2*tan(1/2*d*x + 1/2*c)^4 + 48*a^2*tan(1/
2*d*x + 1/2*c)^3 - 24*a^2*tan(1/2*d*x + 1/2*c)^2 - 16*a^2*tan(1/2*d*x + 1/2*c) - 3*a^2)/tan(1/2*d*x + 1/2*c)^4
)/d

________________________________________________________________________________________

maple [A]  time = 0.31, size = 112, normalized size = 1.37 \[ -\frac {5 a^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{8 d \sin \left (d x +c \right )^{2}}-\frac {5 a^{2} \cos \left (d x +c \right )}{8 d}-\frac {5 a^{2} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8 d}-\frac {2 a^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{3 d \sin \left (d x +c \right )^{3}}-\frac {a^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{4 d \sin \left (d x +c \right )^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^2*csc(d*x+c)^5*(a+a*sin(d*x+c))^2,x)

[Out]

-5/8/d*a^2/sin(d*x+c)^2*cos(d*x+c)^3-5/8*a^2*cos(d*x+c)/d-5/8/d*a^2*ln(csc(d*x+c)-cot(d*x+c))-2/3/d*a^2/sin(d*
x+c)^3*cos(d*x+c)^3-1/4/d*a^2/sin(d*x+c)^4*cos(d*x+c)^3

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 130, normalized size = 1.59 \[ -\frac {3 \, a^{2} {\left (\frac {2 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 12 \, a^{2} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} + \log \left (\cos \left (d x + c\right ) + 1\right ) - \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {32 \, a^{2}}{\tan \left (d x + c\right )^{3}}}{48 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*csc(d*x+c)^5*(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/48*(3*a^2*(2*(cos(d*x + c)^3 + cos(d*x + c))/(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1) - log(cos(d*x + c) + 1
) + log(cos(d*x + c) - 1)) - 12*a^2*(2*cos(d*x + c)/(cos(d*x + c)^2 - 1) + log(cos(d*x + c) + 1) - log(cos(d*x
 + c) - 1)) + 32*a^2/tan(d*x + c)^3)/d

________________________________________________________________________________________

mupad [B]  time = 8.62, size = 161, normalized size = 1.96 \[ \frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12\,d}+\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,d}-\frac {5\,a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (-4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {4\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+\frac {a^2}{4}\right )}{16\,d}-\frac {a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(c + d*x)^2*(a + a*sin(c + d*x))^2)/sin(c + d*x)^5,x)

[Out]

(a^2*tan(c/2 + (d*x)/2)^2)/(8*d) + (a^2*tan(c/2 + (d*x)/2)^3)/(12*d) + (a^2*tan(c/2 + (d*x)/2)^4)/(64*d) - (5*
a^2*log(tan(c/2 + (d*x)/2)))/(8*d) - (cot(c/2 + (d*x)/2)^4*(2*a^2*tan(c/2 + (d*x)/2)^2 - 4*a^2*tan(c/2 + (d*x)
/2)^3 + a^2/4 + (4*a^2*tan(c/2 + (d*x)/2))/3))/(16*d) - (a^2*tan(c/2 + (d*x)/2))/(4*d)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**2*csc(d*x+c)**5*(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________